package com.shuany.ws.cxf.demo;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

public class WebServiceClient {

    public static void main(String[] args) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setAddress("http://localhost:8080/HelloWorld");
        factory.setServiceClass(HelloWorld.class);
        
        HelloWorld hello = (HelloWorld) factory.create();
        String str = hello.sayHello("yushan", 27);
        System.out.println(str);
    }
}
